/**
 * Copyright phonemap.com
 *
 * Licensed under the phonemap.com License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.phonemap.com/licenses/LICENSE-1.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.avatar.entity;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * The Class UserOnlineStatus.
 * @author Uy Phu
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class UserOnlineStatus {
	
	/** The userid. */
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long userid;
	
	/** The last onlin time. */
	@Persistent
	private Date lastOnlineTime;
	
	/** The online status. */
	@Persistent
	private Boolean onlineStatus;

	/**
	 * Instantiates a new user online status.
	 */
	public UserOnlineStatus() {
		
	}
	
	/**
	 * Instantiates a new user online status.
	 *
	 * @param userid the userid
	 * @param lastOnlineTime the last onlin time
	 * @param onlineStatus the online status
	 */
	public UserOnlineStatus(Long userid, Date lastOnlineTime, Boolean onlineStatus) {
		this.userid = userid;
		this.lastOnlineTime = lastOnlineTime;
		this.onlineStatus = onlineStatus;
	}



	/**
	 * Gets the userid.
	 *
	 * @return the userid
	 */
	public Long getUserid() {
		return this.userid;
	}

	/**
	 * Sets the userid.
	 *
	 * @param userid the new userid
	 */
	public void setUserid(Long userid) {
		this.userid = userid;
	}

	/**
	 * Gets the last onlin time.
	 *
	 * @return the last onlin time
	 */
	public Date getLastOnlineTime() {
		return this.lastOnlineTime;
	}

	/**
	 * Sets the last onlin time.
	 *
	 * @param lastOnlineTime the new last onlin time
	 */
	public void setLastOnlineTime(Date lastOnlineTime) {
		this.lastOnlineTime = lastOnlineTime;
	}

	/**
	 * Gets the online status.
	 *
	 * @return the online status
	 */
	public Boolean getOnlineStatus() {
		return this.onlineStatus;
	}

	/**
	 * Sets the online status.
	 *
	 * @param onlineStatus the new online status
	 */
	public void setOnlineStatus(Boolean onlineStatus) {
		this.onlineStatus = onlineStatus;
	}

}
